using UnityEngine;

public interface IState
{
    void IEnter();
    void IExit();
    void ILogicUpd();
    void IPhysicUpd();
}

public abstract class StMachine
{
    protected IState _curSt;

    protected void SwcOn(IState st)
    {
        _curSt = st;
        _curSt.IEnter();
    }

    public void SwcState(IState st)
    {
        _curSt.IExit();
        SwcOn(st);
    }
}
